package com.tao.YanMoDesignPattern.Mediator.pattern;

/**
 * @Author Mi_Tao
 * @Date 2023/7/23
 * @Description 同事类抽象类
 * @Version 1.0
 **/
public abstract class Colleague {

    // 持有中介者对象，每一个同事类都知道它的中介者对象
    private Mediator mediator;

    public Colleague(Mediator mediator) {
        this.mediator = mediator;
    }

    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }
    public Mediator getMediator() {
        return mediator;
    }

}
